//
//  RansomAlertController.m
//  LuCaiZhu
//
//  Created by 邓龙 on 2019/4/5.
//

#import "RansomAlertController.h"

@interface RansomAlertController ()

@property (weak, nonatomic) IBOutlet UIView *yuyueView;
@property (weak, nonatomic) IBOutlet UIView *ransomView;
@property (weak, nonatomic) IBOutlet UILabel *yuyueLabel;

@property (weak, nonatomic) IBOutlet UIImageView *topImg;
@property (weak, nonatomic) IBOutlet UIButton *rightBtn;

@end

@implementation RansomAlertController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    _yuyueLabel.text = _yuyueText;
    
    if (_isRansom) {
        _yuyueView.hidden = YES;
        _ransomView.hidden = NO;
    }
    else {
        _yuyueView.hidden = NO;
        _ransomView.hidden = YES;
    }
    
    if (_rightStr) {
        [_rightBtn setTitle:_rightStr forState:UIControlStateNormal];
        [_topImg setImage:[UIImage imageNamed:@"shuhuiIcon"]];
    }
}

- (IBAction)clickButtonAction:(UIButton *)sender {
    if (sender.tag != 0) {
        _returnBlock(sender.tag);
    }
    [self dismissViewControllerAnimated:YES completion:nil];
}

@end
